// @ts-ignore
import { getRole } from '@/api/common.js';
// @ts-ignore
// import { loadStore } from '@/store/index.js'
// let useLoadStore = loadStore()
// 路由中间件 https://nuxt.com.cn/docs/getting-started/routing
// @ts-ignore
export default defineNuxtRouteMiddleware((to, from) => {
  // isAuthenticated() is an example method verifying if a user is authenticated
  if (to.name ==="beVip" && getRole()!=='admin') {
    // @ts-ignore
    return navigateTo('/')
    // return
  }else{
    return 
  }
  // 页面切换的时候，清空useLoadStore.remainNum
  
})
